# -*- coding: utf-8 -*-
from datetime import datetime

from pydantic import ConfigDict

from App.common.schema import SchemaBase


class {{ table_name_class  }}Schema(SchemaBase):
    model_config = ConfigDict(
        from_attributes=True
    )

    {% for model in models %}
    {{ model.name }}: {% if model.nullable %}{{ model.pd_type }} | None = None{% else %}{{ model.pd_type }}{% endif %}

    {% endfor %}



class Create{{ table_name_class  }}Param({{ table_name_class  }}Schema):
    pass


class Update{{ table_name_class  }}Param({{ table_name_class  }}Schema):
    pass


class Get{{ table_name_class  }}ListDetails({{ table_name_class  }}Schema):

    id: int
    {% if default_datetime_column %}
    created_time: datetime
    updated_time: datetime | None = None
    {% endif %}
